package com.bjtu.boatmq.common.protocol.request;

public class PullMessageRequest{
	String topicName;
	int partitionId;
	int consumeOffset; 	// 消费者请求从哪里开始消费，OFFSET_START,OFFSET_END,null,任意数

	/* 请求类型 */
	public static final int OFFSET_START = 0; // 从分区最开始进行消费
	public static final int OFFSET_END = -1;  // 从分区最后开始消费，下一条消息
	public static final int OFFSET_STORE = -2;// 从存储的消费偏移量进行消费

	/* getter and setter函数 */
	public String getTopicName() {
		return topicName;
	}

	public void setTopicName(String topicName) {
		this.topicName = topicName;
	}

	public int getPartitionId() {
		return partitionId;
	}

	public void setPartitionId(int partitionId) {
		this.partitionId = partitionId;
	}

	public int getConsumeOffset() {
		return consumeOffset;
	}

	public void setConsumeOffset(int consumeOffset) {
		this.consumeOffset = consumeOffset;
	}
}
